{* printable invoice *}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>{"str_invoice_title"|translate}{if $error eq ""} :: {"ordr_order"|translate} #{$order.orderID_view}{/if}</title>
		<base href="{$smarty.const.CONF_FULL_SHOP_URL}" />

		<link rel="stylesheet" href="{$URL_THEME_OFFSET}/main.css" type="text/css" />
		<link rel="stylesheet" href="{$smarty.const.URL_CSS}/general.css" type="text/css" />
	</head>

	<body onLoad="window.print();" style="text-align:center;background-color:#FFFFFF;background-image:none;">
	
	{if $error ne ""}
	<p>{$error}</p>
	{else}
	<p><font class=big><b>{$smarty.const.CONF_SHOP_NAME|escape:'html'}</b></font>
				<br>{$smarty.const.CONF_SHOP_URL}
	
				<h1>{"str_invoice_title"|translate} #{$order.orderID_view}</h1>
	
				<table border="0" cellspacing="1" cellpadding="7" width="98%">
	
					<tr>
						<td>
							<strong>
								<font class=faq>
									<u>{"ordr_order"|translate}</u>
								</font>
							</strong>
						</td>
						<td>
							<strong>
								<font class=faq>
									<u>{lbl_payment}</u>
								</font>
							</strong>
						</td>
						<td>
							<strong>
								<font class=faq>
									<u>{lbl_shipping}</u>
								</font>
							</strong>
						</td>
					</tr>
	
					<tr valign="top">
						<td>
							<table>
								<tr>
									<td>{"ordr_order_time"|translate}: <b>{$order.order_time}</b></td>
								</tr>
								<tr>
									<td>{"ordr_id"|translate}: <b>{$order.orderID_view}</b></td>
								</tr>
								<tr>
									<td>{"ordr_customer"|translate}: <b>{$order.customer_firstname} {$order.customer_lastname}</b></td>
								</tr>
								<tr>
									<td>{"usr_custinfo_email"|translate}: <b>{$order.customer_email}</b></td>
								</tr>
								{foreach from=$order.reg_fields_values item=reg_field}
								<tr><td>{$reg_field.reg_field_name}: <b>{$reg_field.reg_field_value}</b></td></tr>
								{/foreach}
								
	
	
							</table>
						</td>
						<td>
							<table>
								<tr>
									<td>{lbl_payment}: <b>{$order.payment_type}</b></td>
								</tr>
								<tr>
									<td>{"ordr_payee"|translate}: <b>{$order.billing_firstname} {$order.billing_lastname}</b></td>
								</tr>
								<tr>
									<td>{"ordr_billing_address"|translate}:<br>
										<b>{if $order.billing_address ne ""}{$order.billing_address|replace:"<":"&lt;"}<br>{/if}
								{if $order.billing_city ne ""}{$order.billing_city|replace:"<":"&lt;"}{/if}
								{if $order.billing_state ne ""}{$order.billing_state|replace:"<":"&lt;"}{/if}
								{if $order.billing_zip ne ""}{$order.billing_zip|replace:"<":"&lt;"}<br>{/if}{if $order.billing_country ne ""}{$order.billing_country|replace:"<":"&lt;"}{/if}</b>
									</td>
								</tr>
	
					</table>
				</td>
				<td>
					<table>
						<tr>
							<td>{lbl_shipping}: <b>{$order.shipping_type}</b> {if $order.shippingServiceInfo}({$order.shippingServiceInfo}){/if}</td>
						</tr>
						<tr>
							<td>{"ordr_recipient"|translate}: <b>{$order.shipping_firstname} {$order.shipping_lastname}</b></td>
						</tr>
						<tr>
							<td>{"ordr_shipping_address"|translate}:<br>
								<b>{if $order.shipping_address ne ""}{$order.shipping_address|replace:"<":"&lt;"}<br>{/if}
								{if $order.shipping_city ne ""}{$order.shipping_city|replace:"<":"&lt;"}{/if}
								{if $order.shipping_state ne ""}{$order.shipping_state|replace:"<":"&lt;"}{/if}
								{if $order.shipping_zip ne ""}{$order.shipping_zip|replace:"<":"&lt;"}<br>{/if}{if $order.shipping_country ne ""}{$order.shipping_country|replace:"<":"&lt;"}{/if}</b>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			{if $order.customers_comment}
			<td colspan="3">
				<strong>
					<font class=faq><u>{"ordr_comment"|translate}</u></font>
				</strong>
			</td>
			<tr><td colspan="3">{$order.customers_comment}</td></tr>
			{/if}
	
			<tr valign="top"> 
	          	<td colspan="3">
					<strong>
						<font class=faq><u>{"ordr_ordered_products"|translate}</u></font>
					</strong>
				</td>
	       </tr>
	
			<tr>
				<td colspan="3">
	
					<table width="100%" cellpadding="5" cellspacing="0">
	
						<tr class="background1"> 
	                		<td><strong>{"prdset_product_name"|translate}</strong></td>
	                		<td align="center"><strong>{"cart_product_quantity"|translate}</strong></td>
	                		<td align="right" nowrap="nowrap"><strong>{"ordr_itemprice_excluding_tax"|translate}</strong></td>
	              		</tr>
	
						{section name=i loop=$orderContent}
						<tr class="{cycle values='row_odd,row_even'}">
	                		<td>
								{$orderContent[i].name}
	
								{if $orderContent[i].eproduct_filename}
									{if $completed_order_status}
										{if $completed_order_status == $order.statusID}
	
											<a href='{$smarty.const.URL_ROOT}/get_file.php?getFileParam={$orderContent[i].getFileParam}'>
												{"btn_download"|translate} {$orderContent[i].file_size} b
											</a>
		
											{if $orderContent[i].day_count_remainder > 0}
												- {"prdset_download_is_available_for"|translate} 
													{$orderContent[i].day_count_remainder}
												{"msg_days"|translate}
												{if $orderContent[i].load_counter_remainder != 0}
													,
													{"prd_download_downloads_left"|translate} 
														{$orderContent[i].load_counter_remainder}
													{"prd_download_str_downloads"|translate}
												{/if}
											{/if}
										{/if}
									{/if}
								{/if}
	
							</td>
	                		<td align="center">{$orderContent[i].Quantity}</td>
	                		<td align="right" nowrap="nowrap">{$orderContent[i].PriceToShow}</td>
	              		</tr>
						{/section}
					</table>
	
				</td>
			</tr>
		<tr><td colspan="3">&nbsp;</td>
		
		{if $order.order_discount}
		<tr>
			<td colspan="2">{"usr_custinfo_group_discount"|transcape}{$order.order_discount_percent|string_format:', %0.1f%%'}</td>
			<td align="right">{$order.order_discount_valueToShow}</td>
		</tr>
		{/if}
		{if $order.shipping_cost || $order.tax}
		<tr>
			<td colspan="2">{"ordr_subtotal"|translate}</td>
			<td align="right">{$order.clear_total_priceToShow}</td>
		</tr>
		{/if}
		{if $order.shipping_cost}
		<tr>
			<td colspan="2">{"ordr_shipping_handling_cost"|translate}</td>
			<td align="right">{$order.shipping_costToShow}</td>
		</tr>
		{/if}
		{if $order.tax}
		<tr>
			<td colspan="2">{"ordr_tax"|translate}</td>
			<td align="right">{$order.tax_toShow}</td>
		</tr>
		{/if}
		<tr id="ord_total_row">
			<td colspan="2">{"str_total"|translate}</td>
			<td align="right">{$order.order_amountToShow}</td>
		</tr>
		</table>
{/if}
	</body>

</html>